<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>闲言轻博客</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
{{template "comm/link.html"}}
</head>
<body class="lay-blog">
{{template "comm/header.html".}}
<div class="container-wrap">
    <div class="container">
        <div class="contar-wrap">
            <h4 class="item-title">
                <p><i class="layui-icon layui-icon-speaker"></i>公告：<span>欢迎来到我的轻博客</span></p>
            </h4>
        {{range .notes}}
            <div class="item">
                {{template "comm/note_summary_tpl.html" .}}
                <div class="comment count">
                    <a href="/details/{{.Key}}#comment">评论</a>
                    <a href="javascript:;" class="like" data-key="{{.Key}}" data-type="note">点赞</a>
                </div>
            </div>
        {{end}}
        </div>
        <div class="item-btn">
        {{if gt .page 1}}
            <button class="layui-btn layui-btn-normal"
                    onclick="window.location.href='/?page={{add .page -1 }}&title={{.title}}'">
                上一页
            </button>
        {{end}}
        {{if lt .page .totpage}}
            <button class="layui-btn layui-btn-normal"
                    onclick="window.location.href='/?page={{add .page 1 }}&title={{.title}}'"
            >下一页
            </button>
        {{end}}
        </div>
        <input id="curpage" type="hidden" value="{{.page}}">
    </div>
</div>
{{template "comm/footer.html" .}}
<script src="/static/js/index.js"></script>
</body>
</html>